{%- assign buildAt = site.time | date: "%Y%m%d%H%M%S" -%}
<head>
  <title>{{ page.title }}-{{ site.title }}</title>
  <meta charset="utf-8" />
  <meta http-equiv="content-language" content="zh-CN" />
  <meta name="theme-color" content="#ffffff" />
  <meta name="supported-color-schemes" content="light dark" />
  <meta name="renderer" content="webkit" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <meta name="applicable-device" content="pc,mobile" />
  <meta name="author" content="{{ site.author }}" />
  {%- if page.categories %}
  <meta name="description" content="{{ page.title }}" />
  <meta name="keywords" content="{{ site.author }}{% for category in page.categories %},{{ category }}{% endfor %}" />
  {% else %}
  <meta name="description" content="{{ site.description }}" />
  <meta name="keywords" content="{{ site.keywords }}" />
  {% endif -%}
  <link rel="icon" href="{{site.baseurl}}/static/img/favicon.ico" />
  <link rel="apple-touch-icon" href="{{site.baseurl}}/static/img/logo.png" />
  <link rel="stylesheet" href="{{site.baseurl}}/static/css/common.css?t={{buildAt}}" />
  <link rel="stylesheet" href="{{site.baseurl}}/static/css/theme-dark.css?t={{buildAt}}" />
  {%- if page.layout == "mypost" %}
  <link rel="stylesheet" href="{{site.baseurl}}/static/css/post.css?t={{buildAt}}" />
  <link rel="stylesheet" href="{{site.baseurl}}/static/css/code-dark.css?t={{buildAt}}" />
  <link rel="stylesheet" href="{{site.baseurl}}/static/css/code-light.css?t={{buildAt}}" />
  {%- endif %} {%- if page.layout == "page" %}
  <link rel="stylesheet" href="{{site.baseurl}}/static/css/page.css?t={{buildAt}}" />
  {%- endif %}
  <script>
    window.blog = {
      baseurl: '{{site.baseurl}}',
      buildAt: '{{buildAt}}',
      darkMode: false,
      initDarkMode: function (flag) {
        if (flag && flag === 'true') this.darkMode = true
        else if (flag && flag === 'false') this.darkMode = false
        else this.darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
        document.documentElement.className = this.darkMode ? 'dark' : ''
        document.querySelector('meta[name=theme-color]').setAttribute('content', this.darkMode ? '#2D2E32' : '#FFFFFF')
      }
    }
    blog.initDarkMode(localStorage.darkMode)
  </script>
   <!-- ... -->
  <link
    rel="stylesheet"
    href="https://unpkg.com/@waline/client@v3/dist/waline.css"
  />
  <!-- ... -->
</head>
